home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / share / doc / python-apt / examples / metaindex.py < prev    next >
Encoding:
Text File  |  2009-03-30  |  300 b   |  16 lines

  1.  
  2. import apt_pkg
  3.  
  4. apt_pkg.init()
  5.  
  6. sources = apt_pkg.GetPkgSourceList()
  7. sources.ReadMainList()
  8.  
  9.  
  10. for metaindex in sources.List:
  11.     print metaindex
  12.     print "URI: ", metaindex.URI
  13.     print "Dist: ", metaindex.Dist
  14.     print "IndexFiles: ", "\n".join([str(i) for i in metaindex.IndexFiles])
  15.     print
  16.